//
//  ClassVideoModel.m
//  Products_B
//
//  Created by lanou on 16/5/28.
//  Copyright © 2016年 朋学友. All rights reserved.
//

#import "ClassVideoModel.h"

@implementation ClassVideoModel


+ (NSMutableArray *)classVideoModelAnalyseDataWithJsonDic:(NSDictionary *)jsonDic {
    NSMutableArray *modelArray = [NSMutableArray array];
    NSArray *dataArray = jsonDic[@"data"][@"data"];
    // 判断：如果dataArray为空，则直接return，否则程序会崩溃
    if ([dataArray isEqual:[NSNull null]]) {
        return nil;
    }
        for (NSDictionary *dic in dataArray) {
            ClassVideoModel *model = [[ClassVideoModel alloc] init];
            [model setValuesForKeysWithDictionary:dic];
            [modelArray addObject:model];
        }
        return modelArray;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
